import traceback

from com.otc.otcFundValue import run as fundValue
from com.stock.stockKline import run as stockKline
from com.stock.stockMinute import run as stockMinute
from com.stock.stockBaseInfo import run as stockBaseInfo
from com.f10.rank_compare import run as rank_compare
from com.util.loggingUtil import Logs
from com.util.tcp.tcpService import TcpService

if __name__ == '__main__':

    excuteList = ["fundValue()", "stockKline()", "stockMinute()", "stockBaseInfo()", "rank_compare()"]

    for cmd in excuteList:

        try:
            exec(cmd)
        except:
            name = cmd[:cmd.__len__() - 2]
            Logs(name).info(f"{name}:{traceback.format_exc()}")

    TcpService().close()
